package com.yx.changdao.web.config.shiro.token;

import org.apache.shiro.authc.UsernamePasswordToken;

import java.io.Serializable;

/**
 * @Description: <br/>
 * 自定义token <br/>
 * 验证Jwt的token
 * <p>
 * <br/>
 * @Auther: zhangqi
 * @create 2019/11/5 15:57
 */
public class JwtToken extends UsernamePasswordToken implements Serializable {

    /**
     * token
     */
    private String token;


    public JwtToken() {
    }

    public JwtToken(String token) {
        this.token = token;
    }


    public String getToken() {
        return this.token;
    }


    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }

}
